export const createKeyValuesDom = (chinaNameObj: any, jsonData: any, lineNumbers?: any) => {
  let lineNumber = lineNumbers || 9999;
  const linshi: any = [[]];
  chinaNameObj.forEach((item: any, index: number) => {
    let keyVakues: any[] = Object.entries(item)[0];
    let [key, value] = keyVakues;
    let lastArray = linshi[linshi.length - 1];
    if (lastArray.length >= lineNumber) {
      linshi.push([]);
      lastArray = linshi[linshi.length - 1];
    }
    lastArray.push(
      <div key={key + '' + index}>
        <div className="name">{value}:</div>
        <div className="value">{jsonData[key]}</div>
      </div>
    );
  });
  let relNode = linshi.map((item: any, index: number) => {
    return (
      <div className="item" key={index}>
        {item}
      </div>
    );
  });
  return relNode;
};
